package com.zj.pojo;

public class Orange extends Fruit {
    private  Integer id;

    private String region;


    private float weight;

    public Orange(Integer id, String region, float weight) {
        this.id = id;
        this.region = region;
        this.weight = weight;
    }

    public Orange(String region, float weight) {
        this.region = region;
        this.weight = weight;
    }

    public Orange(){}

    /**
     * 若get返回为int，不是Integer，则postForEntity的json转化异常HttpMessageNotWritableException
     *
     */
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }



    public float getWeight() {
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "Apple{" +
                "id=" + id +
                ", region='" + region + '\'' +
                ", weight=" + weight +
                '}';
    }
}
